package com.sun.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Project: hospitalDrugInformationManagement
 * @Author: 86178
 * @Date: 2023/3/29 15:01
 * @FileName: QuartzBean
 * @Description: ""
 */
@Data
public class QuartzBean extends Model<QuartzBean> {
    /**
     * 任务id
     */
    @TableId()
    private Long jobId;

    /**
     * 任务名称
     */
    private String jobName;
    private String jobGroup;

    /**
     * 任务执行类
     */
    private String jobClass;

    /**
     * 任务状态 启动还是暂停
     * 1 暂停 0 启动
     */
    private String status;

    /**
     * 任务运行时间表达式
     */
    private String cronExpression;
    //省略getter setter

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(exist = false)
    private String nextValidTime;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.jobId;
    }
}
